'use strict'

$(document).ready(function () {
	
	ko.applyBindings(new ViewModelReports());	
	
	var w = $(window).width(), 
		h = $(window).height(),
		map_canvas = $('#map_canvas'),
		setMapSize = function(w, h) {
			map_canvas.width(w + 'px');
			map_canvas.height(h + 'px');
		};
	
	setMapSize(w-5, h);
	
	window.onorientationchange = function () {
		setTimeout(function(){
			w = $(window).width(), 
			h = $(window).height(),
			setMapSize(w-5, h);
		}, 1000);
	};
	
});